package com.ccb.sc.goods.service;

import com.ccb.sc.goods.controller.query.AppGoodsQueryParam;
import com.ccb.sc.goods.controller.query.AppGoodsSearchParam;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ccb.sc.goods.vo.AppGoodsListVo;
import com.ccb.sc.goods.vo.AppGoodsVo;
import com.ccb.sc.common.bind.page.PageVo;
import com.ccb.sc.common.modules.goods.entity.Goods;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @author ken
 * @version 1.0
 * @date 2020-09-21
 */
public interface IAppGoodsService extends IService<Goods> {

    /**
     * 分页查询
     *
     * @param queryParam 查询条件
     * @return 分页结果
     */
    PageVo<AppGoodsListVo> list(AppGoodsQueryParam queryParam);


    /**
     * 分页搜索查询
     *
     * @param searchParam 查询条件
     * @return 分页结果
     */
    PageVo<AppGoodsListVo> search(AppGoodsSearchParam searchParam);


    /**
     * 分页搜索查询
     *
     * @param searchParam 查询条件
     * @return 分页结果
     */
    PageVo<AppGoodsListVo> exchange(AppGoodsSearchParam searchParam, Long memberId);


    /**
     * 分页搜索查询
     *
     * @return 分页结果
     */
    PageVo<AppGoodsListVo> hot();

    /**
     * 分页搜索查询
     *
     * @param searchParam 查询条件
     * @return 分页结果
     */
    PageVo<AppGoodsListVo> restock(AppGoodsSearchParam searchParam);

    /**
     * 分页搜索查询
     *
     * @param searchParam 查询条件
     * @return 分页结果
     */
    PageVo<AppGoodsListVo> newStock(AppGoodsSearchParam searchParam);

    /**
     * 商品详情
     * @param goodId 商品id
     * @param request request
     * @return 详情
     */
    AppGoodsVo detail(Long goodId, HttpServletRequest request);

    /**
     * 推荐列表
     * @param goodsId 商品id
     * @return List<AppGoodsListVo>
     */
    List<AppGoodsListVo> recommendList(Long goodsId);

    /**
     * 热搜列表
     * @return List<AppGoodsListVo>
     */
    List<AppGoodsListVo> hotSearchList();
}
